import { mapGetters, mapMutations, mapActions } from "vuex"

/**
 * 用户
 */
export default {
	computed: {
		...mapGetters({
			token: 'token',
			userInfo: 'userInfo',
		})
	},
	watch: {
		token() {
			// 更新登录时间
		},
	},
	methods: {
		...mapMutations('user', {
			RESET_STATE: 'RESET_STATE',
			SET_TOKEN: 'SET_TOKEN',
			SET_USER_INFO: 'SET_USER_INFO',
		}),
		...mapActions('user', {
			codeLogin: 'codeLogin',
			getUserInfo: 'getUserInfo',
			resetToken: 'resetToken',
		})
	}
}